package response

import "net/http"

type MError struct {
	HTTPStatus int
	Code       int
	Msg        string
}

func (m *MError) Error() string {
	return m.Msg
}

var (
	ErrParamParse = &MError{
		HTTPStatus: http.StatusBadRequest,
		Code:       CodeParamParse,
		Msg:        "参数解析失败",
	}

	ErrParamInvalid = &MError{
		HTTPStatus: http.StatusBadRequest,
		Code:       CodeParamInvalid,
		Msg:        "参数无效",
	}
)
